{% extends "base.html" %}

{% block container %}
<div class="md-content" data-md-component="content">
  {% if "navigation.path" in features %}
    {% include "path.html" %}
  {% endif %}
  <article class="md-content__inner md-typeset">
    {% block content %}
      {% include "partials/content.html" %}

      {% if page.previous_page or page.next_page %}
          {% if page.meta and page.meta.hide %}
            {% set hidden = "hidden" if "footer" in page.meta.hide %}
          {% endif %}
          <nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer') }}" {{ hidden }}>
            {% if page.previous_page %}
              {% set direction = lang.t("footer.previous") %}
              <a href="{{ page.previous_page.url | url }}" class="md-footer__link md-footer__link--prev" aria-label="{{ direction }}: {{ page.previous_page.title | e }}">
                <div class="md-footer__button md-icon">
                  {% set icon = config.theme.icon.previous or "material/arrow-left" %}
                  {% include ".icons/" ~ icon ~ ".svg" %}
                </div>
                <div class="md-footer__title">
                  <span class="md-footer__direction">
                    {{ direction }}
                  </span>
                  <div class="md-ellipsis">
                    {{ page.previous_page.title }}
                  </div>
                </div>
              </a>
            {% endif %}
            {% if page.next_page %}
              {% set direction = lang.t("footer.next") %}
              <a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next" aria-label="{{ direction }}: {{ page.next_page.title | e }}">
                <div class="md-footer__title">
                  <span class="md-footer__direction">
                    {{ direction }}
                  </span>
                  <div class="md-ellipsis">
                    {{ page.next_page.title }}
                  </div>
                </div>
                <div class="md-footer__button md-icon">
                  {% set icon = config.theme.icon.next or "material/arrow-right" %}
                  {% include ".icons/" ~ icon ~ ".svg" %}
                </div>
              </a>
            {% endif %}
          </nav>
        {% endif %}
    {% endblock %}
  </article>
</div>
{% endblock %}

{% block header %}
    {% include "header-2.html" %}
{% endblock %}

{% block scripts %}
<script src="/assets/javascripts/termynal.js" data-termynal-container="#termynal"></script>
<script async src="https://tally.so/widgets/embed.js"></script>
{{ super() }}
<script src="https://widget.kapa.ai/kapa-widget.bundle.js"
        data-website-id="1c028b8e-609e-40e3-b792-f3939a461850"
        data-project-name="dstack"
        data-project-color="rgba(0, 0, 0, 0.87)"
        data-font-size-sm="16px"
        data-font-size-md="0.5rem"
        data-font-size-lg="0.75rem"
        data-modal-disclaimer-font-size="0.75rem"
        data-deep-thinking-button-font-size="0.7rem"
        data-button-width="3.6rem"
        data-button-height="3.6rem"
        data-button-text-font-weight="400"
        data-button-image-width="18"
        data-button-image-height="18"
        data-modal-image="/assets/images/dstack-logo-notext.svg"
        data-modal-title="AI Assistant"
        data-button-text-shadow="none"
        data-button-box-shadow="none"
        data-font-family='metro-web, Metro, -apple-system, "system-ui", "Segoe UI", Roboto'
        data-button-text-font-family='metro-web, Metro, -apple-system, "system-ui", "Segoe UI", Roboto'
        data-project-logo="/assets/images/kapa.svg"
        data-modal-disclaimer="This is an assistant with access to documentation, examples, and GitHub issues."
        data-modal-example-questions="How do I install the dstack CLI?,How do I set up the dstack server?"
        data-user-analytics-fingerprint-enabled="true"
        data-modal-x-offset="0"
        data-modal-y-offset="0"
        data-modal-with-overlay="false"
        data-modal-inner-flex-direction="column"
        data-modal-inner-justify-content="end"
        data-modal-inner-max-width="600px"
        data-modal-inner-position-left="auto"
        data-modal-inner-position-right="0"
        data-modal-inner-position-bottom="0"
        data-modal-inner-position-top="0"
        data-modal-lock-scroll="false"
        data-modal-header-bg-color="#fff"
        data-modal-border-radius="3px"
        data-scale-factor="0.9"
        async></script>
{% endblock %}

{% block announce %}
Support dstack with a ⭐ on
<a href="https://github.com/dstackai/dstack" target="_blank">GitHub</a>
{% endblock %}

{% block footer %}
    <footer class="tx-footer">
        <div class="md-main__inner md-grid">
            <div class="tx-footer__left-side">
                <div class="tx-footer__copyright">
                    {% include "partials/copyright.html" %}
                    {% if config.extra.social %}
                        {% include "partials/social.html" %}
                    {% endif %}
                </div>
            </div>

            <div class="tx-footer__right-side">
              <!--<div class="tx-footer__section">
                  <div class="tx-footer__section-title">Contact</div>
                  <a href="mailto:hello@dstack.ai" class="tx-footer__section-link">hello@dstack.ai</a>
                  &lt;!&ndash;<a class="tx-footer__section-link" href="javascript:void(0)" onclick="$crisp.push(['do', 'chat:show'])">Open chat</a>&ndash;&gt;
              </div>-->
            
              <div class="tx-footer__section">
                <div class="tx-footer__section-title">Documentation</div>
                <a href="/docs/installation" class="tx-footer__section-link">Getting started</a>
                <a href="/docs/concepts/backends/" class="tx-footer__section-link">Concepts</a>
                <a href="/docs/guides/protips/" class="tx-footer__section-link">Guides</a>
                <a href="/docs/reference/dstack.yml/dev-environment/" class="tx-footer__section-link">Reference</a>
              </div>
              
              <div class="tx-footer__section">
                <div class="tx-footer__section-title">Examples</div>
                <a href="/examples#fine-tuning" class="tx-footer__section-link">Single-node training</a>
                <a href="/examples#distributed-training" class="tx-footer__section-link">Distributed training</a>
                <a href="/examples#clusters" class="tx-footer__section-link">Clusters</a>
                <a href="/examples#inference" class="tx-footer__section-link">Inference</a>
                <a href="/examples#models" class="tx-footer__section-link">Models</a>
              </div>
              
              <div class="tx-footer__section">
                <div class="tx-footer__section-title">Community</div>
                <a href="https://discord.gg/u8SmfwPpMd" target="_blank" class="tx-footer__section-link external">Discord</a>
                <a href="https://github.com/dstackai/dstack" target="_blank" class="tx-footer__section-link external">GitHub</a>
              </div>
              
              <div class="tx-footer__section">
                <div class="tx-footer__section-title">Company</div>
                <a href="https://calendly.com/dstackai/discovery-call" target="_blank" class="tx-footer__section-link external">Talk to us</a>
                <!-- <a href="/partners" class="tx-footer__section-link">Partners</a> -->
                <a href="/terms" class="tx-footer__section-link">Terms</a>
                <a href="/privacy" class="tx-footer__section-link">Privacy</a>
                <!--<a href="https://dstackai.notion.site/Jobs-at-dstack-ff01a450c3174904b70c36124f2d8f4b" target="_blank" class="tx-footer__section-link external">Careers</a>-->
              </div>
        </div>
    </footer>
{% endblock %}

{% block site_nav %}
    {% if nav %}
      {% if page.meta and page.meta.hide %}
        {% set hidden = "hidden" if "navigation" in page.meta.hide %}
      {% endif %}
      <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" {{ hidden }}>
        <div class="md-sidebar__scrollwrap">
          <div class="md-sidebar__inner">
            {% include "partials/nav.html" %}
          </div>
        </div>
      </div>
    {% endif %}
    {% if "toc.integrate" not in features %}
      {% if page.meta and page.meta.hide %}
        {% set hidden = "hidden" if "toc" in page.meta.hide %}
      {% endif %}
      <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" {{ hidden }}>
        <div class="md-sidebar__scrollwrap">
          <div class="md-sidebar__inner">
            {% include "toc.html" %}
          </div>
        </div>
      </div>
    {% endif %}
{% endblock %}
